<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>
    .b1{
        width: 200px;
        height: 200px;
        background: green;
        padding: 30px;
        border: 10px solid black;
    }
    .b2{
        width: 200px;
        height: 200px;
        background: red;
        margin-top: 100px;
        padding: 30px;
        border: 10px solid black;
        box-sizing: border-box;
    /*怪异盒模型   内边距和边框要压缩盒子内容大小
    也就是设置多少就占多大的空间
    */
    }
    
</style>
</head>
<body>
    <div class="b1"></div>
    <div class="b2"></div>
</body>
</html>